﻿<%@ Page Language="C#" MasterPageFile="~/admintractor/admin.master" AutoEventWireup="true" CodeFile="Role.aspx.cs" Inherits="admintractor_Role" Title="Quyền sử dụng" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="title">Quyền cho người sử dụng</div>
					<div id="view">
						<div class="edit">
                            <table style="width: 100%">
                                <tr>
                                    <td colspan="2">
                                        <b>Quản lý quyền</b></td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="lbError" runat="server" ForeColor="#FF3300"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Tên quyền:</td>
                                            <td>
                                                <asp:TextBox ID="txtName" runat="server" Width="200px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                <asp:Button ID="butAdd" runat="server" Text="Thêm mới" onclick="butAdd_Click" 
                                                     />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                    </table>
                                </div>
						<div class="display">
                            <table style="width: 100%">
                                <tr>
                                    <td colspan="2">
                                        <b>Danh sách quyền sử dụng</b></td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" >
                                            <Columns>
                                                <asp:BoundField DataField="_name" HeaderText="Loại Quyền" />
                                                <asp:TemplateField HeaderText="Thao tác">
                                                
                                                    <ItemTemplate>
                                                        <table style="width: 100%">
                                                            <tr>
                                                                <td>
                                                                    <asp:ImageButton ID="ImEdit" runat="server" ToolTip="Sửa" CommandArgument='<%# Eval("_id","{0}") %>'
                                                                      CommandName="Select"  ImageUrl="~/App_Themes/admin/images/edit.png" 
                                                                        onclick="ImEdit_Click" />
                                                                </td>
                                                                <td>
                                                                    <asp:ImageButton ID="ImDelete" runat="server" ToolTip="Xóa" CommandArgument='<%# Eval("_id","{0}") %>'
                                                                     CommandName="Select"  OnClientClick="return confirm('Are you sure?');" 
                                                                        ImageUrl="~/App_Themes/admin/images/delete.png" onclick="ImDelete_Click" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ItemTemplate>
                                                
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        &nbsp;</td>
                                </tr>
                            </table>
                        </div>
					</div>
</asp:Content>

